<template>
  <div class="app-container" id="printForm">
    <div class="list-per">
      <div class="list">
        <label>年度</label>
        <span>{{ obj.year }}</span>
      </div>
      <div class="list">
        <label>部门绩效目标类型</label>
        <span>{{ departmentPerformanceType === '1' ? '一上编制' : '二上编制' }}</span>
      </div>
    </div>
    <el-divider/>
    <div>
      <el-form class="my-form" :model="obj" label-position="right" label-width="8rem">
        <table width="100%" height="2200" border="1" align="center" cellpadding="1" cellspacing="1" class="table-form">
          <tr>
            <td colspan="2">部门名称:</td>
            <td colspan="4">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.departmentName" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入部门名称"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td colspan="2">部门职能概述:</td>
            <td colspan="4">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.departmentSummarize" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入职能概述"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td :rowspan="obj.currentRows">本年</td>
            <td rowspan="9">本年度部门预算收入</td>
            <td>总额（万元）</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.totalRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入预算收入总额"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>1. 财政拨款收入</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.allocateRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入财政拨款收入"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>其中：一般公共预算</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.allocateRevenue1" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入一般公共预算"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>政府性基金预算</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.allocateRevenue2" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入政府性基金预算"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>国有资本经营预算</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.allocateRevenue3" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入国有资本经营预算"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>2.财政专户管理资金</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.specialRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入财政专户管理资金"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>3.事业收入</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.businessRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入事业收入"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>4.经营收入</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.engageRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入经营收入"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td>5.其他收入</td>
            <td colspan="3">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.otherRevenue" rows="2" type="textarea" class="textarea-1"
                          placeholder="请输入其他收入"/>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td :rowspan="kpiCurrent.length + 1">年度目标</td>
            <td>部门整体支出目标</td>
            <td>
              <span>关键指标</span>
              <div>
                <el-button type="primary" text @click="addKpiCurrent">新增指标</el-button>
                <el-button type="danger" v-if="kpiCurrent.length > 4" text @click="deleKpiCurrent">删除指标</el-button>
              </div>
            </td>
            <td colspan="2">预期实现值</td>
          </tr>
          <tr>
            <td :rowspan="kpiCurrent.length - 1">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.targetThree" :rows="2 * kpiCurrent.length + 2" type="textarea" class="textarea-1"
                          placeholder="请输入部门整体支出目标"/>
              </el-form-item>
            </td>
            <template v-if="kpiCurrent[0]">
              <td>
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="kpiCurrent[0].performance" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入具体指标名称"/>
                </el-form-item>
              </td>
              <td colspan="2">
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="kpiCurrent[0].expect" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入预期实现值"/>
                </el-form-item>
              </td>
            </template>
          </tr>
          <template v-for="(item,index) in kpiCurrent" :key="index">
            <tr v-if="index > 0">
              <td v-if="index === kpiCurrent.length - 1">
                <div class="endStyle">
                  <span>其中：部门年度整体预算完成率：</span>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="obj.targetRateCurrent"/>
                  </el-form-item>
                  <span>%</span>
                </div>
              </td>
              <td>
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="item.performance" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入具体指标名称"/>
                </el-form-item>
              </td>
              <td colspan="2">
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="item.expect" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入预期实现值"/>
                </el-form-item>
              </td>
            </tr>
          </template>
          <tr>
            <td>
              <span>年度主要支出计划（对应任务、政策）</span>
              <div>
                <el-button type="primary" text @click="addPlan1">新增计划</el-button>
                <el-button type="danger" v-if="planCurrent.length > 3" text @click="deletePlan1">删除计划</el-button>
              </div>
            </td>
            <td>任务（政策）的绩效目标</td>
            <td>
              <span>任务（政策）关键性指标（产出、效益、公众满意度方面）</span>
              <div>
                <el-popover placement="bottom" :width="1000" trigger="click">
                  <template #reference>
                    <el-button type="primary" text>新增（指标，绩效）</el-button>
                  </template>
                  <div class="indexs">
                    <template v-for="(item,index) in planCurrent" :key="index">
                      <div class="index-list">
                        <div class="index-list-title">
                          <h3>年度主要支出计划（对应任务、政策）{{ index + 1 }}</h3>
                          <el-button type="primary" text @click="addPlanCurrent(index)">新增</el-button>
                        </div>
                        <div class="content-per">
                          <div class="index-list-content" v-for="(item1,index1) in item.planContents" :key="index1">
                            <div class="content-text">指标{{ index1 + 1 }}</div>
                            <el-button type="danger" text @click="deletePlanCurrent(index,index1)"
                                       :disabled="index1 < 4">删除
                            </el-button>
                          </div>
                        </div>
                      </div>
                    </template>
                  </div>
                </el-popover>
              </div>
            </td>
            <td>绩效标准（指标解释及预期实现值）</td>
            <td>主要实施项目（项目名称）</td>
          </tr>
          <template v-for="(item,index) in planCurrent" :key="index">
            <tr>
              <td :rowspan="item.indexsNum1">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="item.planContent" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入年度主要支出计划（对应任务、政策）"/>
                </el-form-item>
              </td>
              <td :rowspan="item.indexsNum1">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="item.planKpi" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入任务（政策）的绩效目标"/>
                </el-form-item>
              </td>
              <template v-if="item.planContents && item.planContents[0]">
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="item.planContents[0].planKpi" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入具体指标名称"/>
                  </el-form-item>
                </td>
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="item.planContents[0].planKpiContent" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入绩效标准"/>
                  </el-form-item>
                </td>
              </template>
              <td :rowspan="item.indexsNum1">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="item.planItem" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入项目"/>
                </el-form-item>
              </td>
            </tr>
            <template v-for="(item1,index1) in item.planContents" :key="index1">
              <tr v-if="index1 > 0">
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="item1.planKpi" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入具体指标名称"/>
                  </el-form-item>
                </td>
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="item1.planKpiContent" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入绩效标准"/>
                  </el-form-item>
                </td>
              </tr>
            </template>
          </template>

          <!--三年期-->

          <tr>
            <td :rowspan="obj.thirdRows">三年期</td>
          </tr>
          <tr>
            <td :rowspan="kpiThree.length + 1">年度目标</td>
            <td>部门整体支出目标</td>
            <td>
              <span>关键指标</span>
              <div>
                <el-button type="primary" text @click="addKpiThree">新增指标</el-button>
                <el-button type="danger" v-if="kpiThree.length > 4" text @click="deleteKpiThree">删除指标</el-button>
              </div>
            </td>
            <td colspan="2">预期实现值</td>
          </tr>
          <tr>
            <td :rowspan="kpiThree.length - 1">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.targetCurrent" :rows="2 * kpiThree.length + 2" type="textarea" class="textarea-1"
                          placeholder="请输入部门整体支出目标"/>
              </el-form-item>
            </td>
            <template v-if="kpiThree[0]">
              <td>
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="kpiThree[0].performance" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入具体指标名称"/>
                </el-form-item>
              </td>
              <td colspan="2">
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="kpiThree[0].expect" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入预期实现值"/>
                </el-form-item>
              </td>
            </template>
          </tr>
          <template v-for="(item,index) in kpiThree" :key="index">
            <tr v-if="index > 0">
              <td v-if="index === kpiThree.length - 1">
                <div class="endStyle">
                  <span>其中：部门年度整体预算完成率：</span>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="obj.targetRateThree"/>
                  </el-form-item>
                  <span>%</span>
                </div>
              </td>
              <td>
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="item.performance" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入具体指标名称"/>
                </el-form-item>
              </td>
              <td colspan="2">
                <el-form-item class="form-table-textarea" label="">
                  <el-input v-model="item.expect" :rows="2" type="textarea" class="textarea-1"
                            placeholder="请输入预期实现值"/>
                </el-form-item>
              </td>
            </tr>
          </template>
          <tr>
            <td>
              <span>三年期主要支出计划（对应任务、政策）</span>
              <div>
                <el-button type="primary" text @click="addPlan2">新增计划</el-button>
                <el-button type="danger" v-if="planThree.length > 3" text @click="deletePlan2">删除计划</el-button>
              </div>
            </td>
            <td>任务（政策）的绩效目标</td>
            <td>
              <span>任务（政策）关键性指标（产出、效益、公众满意度方面）</span>
              <div>
                <el-popover placement="bottom" :width="1000" trigger="click">
                  <template #reference>
                    <el-button type="primary" text>新增（指标，绩效）</el-button>
                  </template>
                  <div class="indexs">
                    <template v-for="(item,index) in planThree" :key="index">
                      <div class="index-list">
                        <div class="index-list-title">
                          <h3>三年期主要支出计划（对应任务、政策）{{ index + 1 }}</h3>
                          <el-button type="primary" text @click="addPlanThree(index)">新增</el-button>
                        </div>
                        <div class="content-per">
                          <div class="index-list-content" v-for="(item1,index1) in item.planContents" :key="index1">
                            <div class="content-text">指标{{ index1 + 1 }}</div>
                            <el-button type="danger" text @click="deletePlanThree(index,index1)" :disabled="index1 < 4">
                              删除
                            </el-button>
                          </div>
                        </div>
                      </div>
                    </template>
                  </div>
                </el-popover>
              </div>
            </td>
            <td>绩效标准（指标解释及预期实现值）</td>
            <td>主要实施项目（项目名称）</td>
          </tr>
          <template v-for="(row,index) in planThree" :key="index">
            <tr>
              <td :rowspan="row.indexsNum2">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="row.planContent" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入年度主要支出计划（对应任务、政策）"/>
                </el-form-item>
              </td>
              <td :rowspan="row.indexsNum2">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="row.planKpi" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入任务（政策）的绩效目标"/>
                </el-form-item>
              </td>
              <template v-if="row.planContents && row.planContents[0]">
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="row.planContents[0].planKpi" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入具体指标名称111"/>
                  </el-form-item>
                </td>
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="row.planContents[0].planKpiContent" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入绩效标准222"/>
                  </el-form-item>
                </td>
              </template>
              <td :rowspan="row.indexsNum2">
                <el-form-item class="form-table-textarea" label="" prop="targetAll">
                  <el-input v-model="row.planItem" rows="10" type="textarea" class="textarea-1"
                            placeholder="请输入项目"/>
                </el-form-item>
              </td>
            </tr>
            <template v-for="(row1,index1) in row.planContents" :key="'index1-'+index+'-'+index1">
              <tr v-if="index1 > 0">
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll">
                    <el-input v-model="row1.planKpi" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入具体指标名称"/>
                  </el-form-item>
                </td>
                <td>
                  <el-form-item class="form-table-textarea" label="" prop="targetAll" ref="row1">
                    <el-input v-model="row1.planKpiContent" rows="2" type="textarea" class="textarea-1"
                              placeholder="请输入绩效标准"/>
                  </el-form-item>
                </td>
              </tr>
            </template>
          </template>
          <tr>
            <td rowspan="4">其他需要说明的情况</td>
            <td rowspan="4" colspan="5">
              <el-form-item class="form-table-textarea" label="" prop="targetAll">
                <el-input v-model="obj.others" rows="4" type="textarea" class="textarea-1"
                          placeholder="请输入其他需要说明的情况"/>
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-form>
      <div class="btns">
        <!-- <el-button type="success">暂存</el-button> -->
        <el-button type="primary" @click="handleSave">保存</el-button>
        <!-- <el-button type="primary">导出</el-button> -->
        <el-button type="primary" v-print="'#printForm'">打印</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import {doGet, doPost, doPut, doDelete, doGetDownload} from '@/config/http'
import baseConfig from '@/mixins/baseConfig'
import {getListPageSize, notifySuccess, svc} from "@/config/common";
import {ref, computed, watch, onMounted} from 'vue'
import {ElNotification} from 'element-plus'

const props = defineProps({
  departmentPerformanceType: {
    required: true,
    type: String,
  },
})
// let rowNum1 = ref(27)
// let rowNum2 = ref(19)
const emptyObj = {
  currentRows: 27,
  thirdRows: 19,
  allocateRevenue: '', // 财政拨款收入
  allocateRevenue1: '',// 一般公共预算
  allocateRevenue2: '', // 政府性基金预算
  allocateRevenue3: '',	 // 国有资本经营预算
  businessRevenue: '',	 // 事业收入
  createBy: '',	 // 创建人用户ID
  createTime: '',	 // 创建时间
  deleted: '',	 // 删除标识：0未删除、1已删除
  departmentPerformanceType: '',	// 部门绩效类型 区分一上编制还是二上编制
  departmentName: '',	 // 部门名称
  departmentSummarize: '',	// 部门职能概述
  engageRevenue: '', // 经营收入
  id: '',	// 主键ID
  otherRevenue: '',	// 其他收入
  others: '',	// 其他需要说明的情况
  specialRevenue: '',	// 财政专户管理资金
  targetCurrent: '',	// 部门整体支出目标（本年）
  targetRateCurrent: '',	// 部门年度整体预算完成率（本年）
  targetRateThree: '',	// 部门年度整体预算完成率（三年期）
  targetThree: '',	// 部门整体支出目标（三年期）
  totalRevenue: '',	 // 本年度部门预算收入（总额）
  updateBy: '',	// 最后修改人用户ID
  updateTime: '',	// 最后修改时间
  version: '',	// 数据版本
  year: new Date().getFullYear(), // 年度
  kpis: [
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '0',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '0',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '0',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '0',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '1',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '1',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '1',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformanceKpiType: '1',	//部门绩效目标指标类型
      expect: '',	//预期实现值
      id: '',	//主键ID
      performance: '',	//关键指标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
  ],
  plans: [
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '0',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '0',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '0',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '1',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '1',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
    {
      createBy: '',	//创建人用户ID
      createTime: '',	//创建时间
      deleted: '',	//删除标识：0未删除、1已删除
      departmentPerformanceId: '',	//部门绩效目标ID
      departmentPerformancePlanType: '1',	//部门绩效目标计划类型
      id: '',	//主键ID
      planContent: '',	//主要支出计划
      planContents: [
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
        {
          createBy: '',	//创建人用户ID		false
          createTime: '',	//创建时间		false
          deleted: '',	//删除标识：0未删除、1已删除		false
          departmentPerformanceId: '',	//部门绩效目标ID		false
          departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
          id: '',	//主键ID		false
          planKpi: '',	//关键性指标		false
          planKpiContent: '',	//绩效标准		false
          updateBy: '',	//最后修改人用户ID		false
          updateTime: '',	//最后修改时间		false
          version: '',//数据版本		false
        },
      ],
      planItem: '',	//主要实施项目
      planKpi: '',	//任务（政策）的绩效目标
      updateBy: '',	//最后修改人用户ID
      updateTime: '',	//最后修改时间
      version: '',	//数据版本
    },
  ]
}
const emptykpi = {
  createBy: '',	//创建人用户ID
  createTime: '',	//创建时间
  deleted: '',	//删除标识：0未删除、1已删除
  departmentPerformanceId: '',	//部门绩效目标ID
  departmentPerformanceKpiType: '',	//部门绩效目标指标类型
  expect: '',	//预期实现值
  id: '',	//主键ID
  performance: '',	//关键指标
  updateBy: '',	//最后修改人用户ID
  updateTime: '',	//最后修改时间
  version: '',	//数据版本
}

const emptyplan = {
  createBy: '',	//创建人用户ID
  createTime: '',	//创建时间
  deleted: '',	//删除标识：0未删除、1已删除
  departmentPerformanceId: '',	//部门绩效目标ID
  departmentPerformancePlanType: '',	//部门绩效目标计划类型
  id: '',	//主键ID
  planContent: '',	//主要支出计划
  planItem: '',	//主要实施项目
  planKpi: '',	//任务（政策）的绩效目标
  updateBy: '',	//最后修改人用户ID
  updateTime: '',	//最后修改时间
  version: '',	//数据版本
  planContents: [] // 指标，绩效
}

const empyPlanContents = {
  createBy: '',	//创建人用户ID		false
  createTime: '',	//创建时间		false
  deleted: '',	//删除标识：0未删除、1已删除		false
  departmentPerformanceId: '',	//部门绩效目标ID		false
  departmentPerformancePlanId: '',	//部门绩效目标计划表ID		false
  id: '',	//主键ID		false
  planKpi: '',	//关键性指标		false
  planKpiContent: '',	//绩效标准		false
  updateBy: '',	//最后修改人用户ID		false
  updateTime: '',	//最后修改时间		false
  version: '',//数据版本		false
}
let obj = ref(Object.assign({}, emptyObj))
let kpiCurrent = ref([])
let kpiThree = ref([])
let planCurrent = ref([])
let planThree = ref([])


watch(() => props.departmentPerformanceType, async val => {
  if (val) {
    let param = {
      departmentPerformanceType: val,
      year: '2023',
      pageSize: getListPageSize()
    }
    obj.value.departmentPerformanceType = val
    await initTypeData(param)
  }
}, {immediate: true})

async function initTypeData(param) {
  let res = await doGet(svc, '/department-performance/page', param, false)
  if (res['records'].length > 0) {
    obj.value = res['records'][0]
    let p2 = doGet(svc, '/department-performance-kpi/page', {
      departmentPerformanceId: obj.value.id,
      pageSize: getListPageSize()
    }, false)
    let p3 = doGet(svc, '/department-performance-plan/page', {
      departmentPerformanceId: obj.value.id,
      pageSize: getListPageSize()
    }, false)
    let resArray = await Promise.all([p2, p3])
    if (resArray[0]['records'].length > 0) {
      let oKpis = resArray[0]['records'].reverse()
      kpiCurrent.value = oKpis.filter(item => item.departmentPerformanceKpiType === '0')
      kpiThree.value = oKpis.filter(item => item.departmentPerformanceKpiType === '1')
    }

    if (resArray[1]['records'].length > 0) {
      let plans = resArray[1]['records'].reverse()
      planCurrent.value = plans.filter(item => item.departmentPerformancePlanType === '0')
      planThree.value = plans.filter(item => item.departmentPerformancePlanType === '1')
    }

    let p4 = await doGet(svc, '/department-performance-plan-content/page', {
      departmentPerformanceId: obj.value.id,
      pageSize: getListPageSize()
    }, false)
    if (p4['records'].length > 0) {
      let oPlanContents = p4['records'].reverse()
      planCurrent.value = planCurrent.value.map(item => {
        item.planContents = oPlanContents.filter(item1 => item1.departmentPerformancePlanId === item.id)
        item.indexsNum1 = item.planContents.length
        return item
      })
      planThree.value = planThree.value.map(item => {
        item.planContents = oPlanContents.filter(item1 => item1.departmentPerformancePlanId === item.id)
        item.indexsNum2 = item.planContents.length
        return item
      })
    }
  } else {
    kpiCurrent.value = emptyObj.kpis.filter(item => item.departmentPerformanceKpiType === '0')
    kpiThree.value = emptyObj.kpis.filter(item => item.departmentPerformanceKpiType === '1')

    planCurrent.value = emptyObj.plans.filter(item => item.departmentPerformancePlanType === '0')
    planThree.value = emptyObj.plans.filter(item => item.departmentPerformancePlanType === '1')

    planCurrent.value = planCurrent.value.map(item => {
      item.indexsNum1 = item.planContents.length
      return item
    })

    planThree.value = planThree.value.map(item => {
      item.indexsNum2 = item.planContents.length
      return item
    })
  }
}

// 年度目标新增
function addKpiCurrent() {
  let data = Object.assign({}, emptykpi)
  data.departmentPerformanceKpiType = '0'
  kpiCurrent.value.push(data)
  obj.value.currentRows += 1
}

// 年度目标删除
function deleKpiCurrent() {
  kpiCurrent.value.pop()
  obj.value.currentRows -= 1
}

// 三年期年度目标新增
function addKpiThree() {
  let data = Object.assign({}, emptykpi)
  data.departmentPerformanceKpiType = '1'
  kpiThree.value.push(data)
  obj.value.thirdRows += 1
}

// 三年期年度目标删除
function deleteKpiThree() {
  kpiThree.value.pop()
  obj.value.thirdRows -= 1
}

// 年度计划新增
function addPlan1() {
  let dataPlan = Object.assign({}, emptyplan)
  dataPlan.departmentPerformancePlanType = '0'
  dataPlan.indexsNum1 = 4
  let dataPlanContents = Object.assign({}, empyPlanContents)
  dataPlan.planContents = []
  for (var i = 0; i < 4; i++) {
    dataPlan.planContents.push(dataPlanContents)
  }
  planCurrent.value.push(dataPlan)
  obj.value.currentRows += 4
}

// 年度计划删除
function deletePlan1() {
  planCurrent.value.pop()
  obj.value.currentRows -= 4
}

// 三年期计划新增
function addPlan2() {
  let dataPlan = Object.assign({}, emptyplan)
  dataPlan.departmentPerformancePlanType = '1'
  dataPlan.indexsNum2 = 4
  let dataPlanContents = Object.assign({}, empyPlanContents)
  dataPlan.planContents = []
  for (let i = 0; i < 4; i++) {
    dataPlan.planContents.push(dataPlanContents)
  }
  planThree.value.push(dataPlan)
  obj.value.thirdRows += 4
}

// 三年期计划删除
function deletePlan2() {
  planThree.value.pop()
  obj.value.thirdRows -= 4
}

// 本年计划指标，绩效新增
function addPlanCurrent(index) {
  let dataPlanContents = Object.assign({}, empyPlanContents)
  planCurrent.value[index].planContents.push(dataPlanContents)
  obj.value.currentRows += 1
  planCurrent.value[index].indexsNum1 += 1
}

// 本年计划指标，绩效删除
function deletePlanCurrent(index, index1) {
  planCurrent.value[index].planContents.splice(index1, 1)
  obj.value.currentRows -= 1
  planCurrent.value[index].indexsNum1 -= 1
}

// 三年期计划指标，绩效新增
function addPlanThree(index) {
  let dataPlanContents = Object.assign({}, empyPlanContents)
  planThree.value[index].planContents.push(dataPlanContents)
  obj.value.thirdRows += 1
  planThree.value[index].indexsNum2 += 1
}

// 三年期计划指标，绩效删除
function deletePlanThree(index, index1) {
  planThree.value[index].planContents.splice(index1, 1)
  obj.value.thirdRows -= 1
  planThree.value[index].indexsNum2 -= 1
}

// 提交数据组装
function handleSave() {
  let data = obj.value
  data.kpis = [...kpiCurrent.value, ...kpiThree.value]
  data.plans = [...planCurrent.value, ...planThree.value]
  doPost(svc, '/customStatisticsDepartmentPerformance/saveDepartmentPerformance', data).then(() => {
    notifySuccess('保存成功')
  })
}

</script>
<style>
.endStyle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.endStyle .el-input {
  border: none !important;
  resize: none !important;
  outline: none !important;
}

.endStyle .el-input__inner {
  width: 40px !important;
  /* pointer-events: none; */
  border: none !important;
  resize: none !important;
  outline: none !important;
  border-radius: 0 !important;
  /* border-bottom: 1px solid var(--el-border-color) !important; */

}

.textarea-1 .el-textarea__inner {
  /* pointer-events: none; */
  border: none !important;
  resize: none !important;
  outline: none !important;
  border-radius: 0 !important;
}

.form-table-textarea .el-form-item__content {
  /* width: 100%; */
  padding: 0;
  margin-left: 0 !important;
}
</style>
<style scoped>
.table-form {
  border-collapse: collapse;
  text-align: center;
}

.el-popper {
  overflow: hidden;
}

.form-list-content-1 .el-form-item__label {
  width: 11.25rem !important;
}

.table-form .form-table-textarea {
  margin-bottom: 0 !important;
}

.textarea-1 .el-textarea__inner {
  /* pointer-events: none; */
  border: none !important;
  resize: none !important;
  outline: none !important;
  border-radius: 0 !important;
}

.btns {
  margin: 1.875rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-show-per {
  display: flex;
  align-items: center;
}

.project-show {
  margin-left: 20px;
}

.project-show-title {
  color: #337ecc;
  padding-left: 10px;
}

.indexs {
  display: flex;
  flex-wrap: wrap;
}

.index-list {
  margin: 0 20px
}

.index-list h3 {
  font-weight: bold;
  /* text-align: center; */
}

.content-per {

}

.index-list-content {
  display: flex;
  align-items: center;
}

.content-text {
  width: 300px;
  /* background: red; */
}

.index-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.query-per {
  display: flex;
  align-items: center;
}

.query-per .el-button {
  margin-left: 20px;
}

.list-per {

}

.list {
  display: flex;
  align-items: center;
  margin: 15px 0;
}
</style>
